all: clean build

bits=32
filename=NASMHello

build:
	set -xe
	cp include/* .
	cp NASM/macro.c .
	gcc -c macro.c -o macro.o -m${bits}
	nasm -f elf${bits} ${filename}.asm -l ${filename}.lst -o ${filename}.o
	gcc ${filename}.o macro.o -g -o ${filename} -m${bits} -no-pie

clean:
	rm -f ${filename}.o ${filename} macro* *.inc *.lst
